<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/betou_sys/head.html"/>
<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = getTableForm();
	f.action="o_delete.do";
	f.submit();
}
</script>
</head>
<body class="list">
<div class="box-positon">
	<@s.m "global.position"/>: <@s.m "cmsGuestbook.function"/> - <@s.m "global.list"/>
	<form class="ropt">
		<input class="formButton" type="submit" value="<@s.m "global.add"/>" onclick="this.form.action='v_add.do';"/>
	</form>
	<div class="clear"></div>
</div>
<div class="body-box">
<div class="listBar">
<form action="v_list.do" method="post">
	标题：<input type="text" class="formText" name="queryForTitle"  value="${queryForTitle!}" />
	用户：<input type="text" class="formText" name="queryForUser"  value="${queryForUser!}" style="width:80px"  />
		IP：<input type="text" class="formText" name="queryForIp" style="width:80px" value="${queryForIp!}" />
		推荐：<select name="queryForRecomment"><option value="">请选择</option><option value="1" <#if queryForRecomment?? && queryForRecomment == "1"> selected</#if> >是</option><option value="0" <#if queryForRecomment?? && queryForRecomment == "0"> selected</#if> >否</option></select>
		审核：<select name="queryForCheck"><option value="">请选择</option><option value="1" <#if queryForCheck?? && queryForCheck == "1"> selected</#if> >是</option><option value="0" <#if queryForCheck?? && queryForCheck == "0"> selected</#if>>否</option></select>
		排序：<select name="queryForOrder">
					<option value="0" >默认</option>
					<option value="1"  <#if queryForOrder?? && queryForOrder == 1> selected</#if>>时间降序</option>
					<option value="2"  <#if queryForOrder?? && queryForOrder == 2> selected</#if>>时间升序</option>
		</select>
		<input class="query" type="submit" value="<@s.m "global.query"/>"/>
</form>		
</div>
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value="${pageNo!}"/>
<input type="hidden" name="queryForTitle" value="${queryForTitle!}"/>
<input type="hidden" name="queryForIp" value="${queryForIp!}"/>
<input type="hidden" name="queryForRecomment" value="${queryForRecomment!}"/>
<input type="hidden" name="queryForCheck" value="${queryForCheck!}"/>
<input type="hidden" name="queryForUser" value="${queryForUser!}"/>
<input type="hidden" name="queryForOrder" value="${queryForOrder!}"/>



<@p.table value=pagination;cmsGuestbook,i,has_next><#rt/>
	<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
		<input type='checkbox' name='ids' value='${cmsGuestbook.id}'/><#t/>
	</@p.column><#t/>
	<@p.column title="ID">${cmsGuestbook.id}</@p.column><#t/>
	<@p.column code="cmsGuestbook.title"><a class="title" href="v_list.do?queryForCtgId=${cmsGuestbook.ctg.id}">【${cmsGuestbook.ctg.name}】</a>${cmsGuestbook.title!'无标题'}</@p.column><#t/>
	<@p.column code="cmsGuestbook.member">
	<#if (cmsGuestbook.member)?? >
		<#if ( cmsGuestbook.member.admin )>
			${cmsGuestbook.member.username}
		<#else>
			<a target="_blank" href="../member/v_edit.do?id=${cmsGuestbook.member.id}"  class="pn-opt" title="${cmsGuestbook.member.username}">${cmsGuestbook.member.username}</a>
		</#if>
	<#else>
		<@s.m "cmsComment.anonymity"/>
	</#if>
</@p.column><#t/>

	<@p.column code="cmsComment.pubIp">
		${cmsGuestbook.ip}
	</@p.column><#t/>
	<@p.column code="cmsGuestbook.createTime" >${cmsGuestbook.createTime}</@p.column><#t/>
	
<@p.column code="cmsGuestbook.recommend">
<#if cmsGuestbook.recommend>
<span class="trueIcon">&nbsp;</span>
<#else>
<span class="falseIcon">&nbsp;</span>
</#if>
</@p.column><#t/>
<@p.column code="cmsGuestbook.checked">
	<#if !cmsGuestbook.checked>
		<span class="falseIcon">&nbsp;</span>
	<#else>
		<span class="trueIcon">&nbsp;</span>
	</#if>
</@p.column><#t/>
<@p.column code="cmsComment.isReply">
	<#if cmsGuestbook.replayTime??>
		<a href="v_edit.do?id=${cmsGuestbook.id}&pageNo=${pageNo!}" title="查看回复"><span class="trueIcon">&nbsp;</span></a>
	<#else>
		<span class="falseIcon">&nbsp;</span>
	</#if>
</@p.column><#t/>

<@p.column code="global.operate" >
		<a href="v_edit.do?id=${cmsGuestbook.id}&pageNo=${pageNo!}" class="pn-opt"><@s.m "global.edit"/></a> | <#rt/>
		<a href="o_delete.do?ids=${cmsGuestbook.id}&pageNo=${pageNo!}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}" class="pn-opt"><@s.m "global.delete"/></a><#t/>
</@p.column><#t/>
</@p.table>
<div  class="pagerBar"><input class="formButton" type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>